home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / CIncludes / CMAcceleration.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-12  |  4.2 KB  |  143 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        CMAcceleration.h
  3.  
  4.      Contains:    ColorSync 2.0 Acceleration Component Interfaces
  5.  
  6.      Version:    Technology:    ColorSync 2.0
  7.                  Release:    Universal Interfaces 3.0.1
  8.  
  9.      Copyright:    © 1995, 1997 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __CMACCELERATION__
  19. #define __CMACCELERATION__
  20.  
  21. #ifndef __COMPONENTS__
  22. #include <Components.h>
  23. #endif
  24. #ifndef __CMAPPLICATION__
  25. #include <CMApplication.h>
  26. #endif
  27.  
  28.  
  29.  
  30. #if PRAGMA_ONCE
  31. #pragma once
  32. #endif
  33.  
  34. #ifdef __cplusplus
  35. extern "C" {
  36. #endif
  37.  
  38. #if PRAGMA_IMPORT
  39. #pragma import on
  40. #endif
  41.  
  42. #if PRAGMA_STRUCT_ALIGN
  43.     #pragma options align=mac68k
  44. #elif PRAGMA_STRUCT_PACKPUSH
  45.     #pragma pack(push, 2)
  46. #elif PRAGMA_STRUCT_PACK
  47.     #pragma pack(2)
  48. #endif
  49.  
  50. /* –––––––––––––––––––––––––––––––––––––– version info */
  51.  
  52. enum {
  53.     cmAccelerationInterfaceVersion = 1
  54. };
  55.  
  56. /* –––––––––––––––––––––––––––––––––––––– Component Type */
  57.  
  58. enum {
  59.     cmAccelerationComponentType    = FOUR_CHAR_CODE('csac')
  60. };
  61.  
  62. /* –––––––––––––––––––––––––––––––––––––– Required Component function selectors */
  63.  
  64. enum {
  65.     cmLoadTables                = 0,
  66.     cmCalculateData                = 1
  67. };
  68.  
  69. /* –––––––––––––––––––––––––––––––––––––– table data for acceleration component */
  70. struct CMAccelerationTableData {
  71.     long                             inputLutEntryCount;            /* count of entries for input lut for one dimension*/
  72.     long                             inputLutWordSize;            /* count of bits of each entry ( e.g. 16 for WORD )*/
  73.     Handle                             inputLut;                    /* handle to input lut*/
  74.     long                             outputLutEntryCount;        /* count of entries for output lut for one dimension    */
  75.     long                             outputLutWordSize;            /* count of bits of each entry ( e.g. 8 for BYTE )*/
  76.     Handle                             outputLut;                    /* handle to output lut*/
  77.     long                             colorLutInDim;                /* input dimension  ( e.g. 3 for LAB ; 4 for CMYK )*/
  78.     long                             colorLutOutDim;                /* output dimension ( e.g. 3 for LAB ; 4 for CMYK )*/
  79.     long                             colorLutGridPoints;            /* count of gridpoints for color lut ( for one Dimension )    */
  80.     long                             colorLutWordSize;            /* count of bits of each entry ( e.g. 8 for BYTE )*/
  81.     Handle                             colorLut;                    /* handle to color lut*/
  82.     CMBitmapColorSpace                 inputColorSpace;            /* packing info for input*/
  83.     CMBitmapColorSpace                 outputColorSpace;            /* packing info for output*/
  84.     void *                            userData;
  85.     unsigned long                     reserved1;
  86.     unsigned long                     reserved2;
  87.     unsigned long                     reserved3;
  88.     unsigned long                     reserved4;
  89.     unsigned long                     reserved5;
  90. };
  91. typedef struct CMAccelerationTableData CMAccelerationTableData;
  92.  
  93. typedef CMAccelerationTableData *        CMAccelerationTableDataPtr;
  94. typedef CMAccelerationTableDataPtr *    CMAccelerationTableDataHdl;
  95. /* –––––––––––––––––––––––––––––––––––––– calc data for acceleration component */
  96. struct CMAccelerationCalcData {
  97.     long                             pixelCount;                    /* count of input pixels*/
  98.     Ptr                             inputData;                    /* input array*/
  99.     Ptr                             outputData;                    /* output array*/
  100.     unsigned long                     reserved1;
  101.     unsigned long                     reserved2;
  102. };
  103. typedef struct CMAccelerationCalcData CMAccelerationCalcData;
  104.  
  105. typedef CMAccelerationCalcData *        CMAccelerationCalcDataPtr;
  106. typedef CMAccelerationCalcDataPtr *        CMAccelerationCalcDataHdl;
  107. /*
  108.    ———————————————————————————————————————————————————————————————————————————————————————————————— 
  109.                   A c c e l e r a t i o n   C o m p o n e n t   I n t e r f a c e s
  110.    ———————————————————————————————————————————————————————————————————————————————————————————————— 
  111. */
  112. EXTERN_API( CMError )
  113. CMAccelerationLoadTables        (ComponentInstance         CMSession,
  114.                                  CMAccelerationTableDataPtr  tableData)                        FIVEWORDINLINE(0x2F3C, 0x0004, 0x0000, 0x7000, 0xA82A);
  115.  
  116.  
  117. EXTERN_API( CMError )
  118. CMAccelerationCalculateData        (ComponentInstance         CMSession,
  119.                                  CMAccelerationCalcDataPtr  calcData)                        FIVEWORDINLINE(0x2F3C, 0x0004, 0x0001, 0x7000, 0xA82A);
  120.  
  121.  
  122.  
  123. #if PRAGMA_STRUCT_ALIGN
  124.     #pragma options align=reset
  125. #elif PRAGMA_STRUCT_PACKPUSH
  126.     #pragma pack(pop)
  127. #elif PRAGMA_STRUCT_PACK
  128.     #pragma pack()
  129. #endif
  130.  
  131. #ifdef PRAGMA_IMPORT_OFF
  132. #pragma import off
  133. #elif PRAGMA_IMPORT
  134. #pragma import reset
  135. #endif
  136.  
  137. #ifdef __cplusplus
  138. }
  139. #endif
  140.  
  141. #endif /* __CMACCELERATION__ */
  142.  
  143.